package com.foo.wechat.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foo.wechat.mapper.WxOrderMapper;
import com.foo.wechat.domain.WxOrder;
import com.foo.wechat.service.IWxOrderService;
import com.foo.common.core.text.Convert;

/**
 * 领养订单Service业务层处理
 * 
 * @author foo
 * @date 2025-11-17
 */
@Service
public class WxOrderServiceImpl implements IWxOrderService 
{
    @Autowired
    private WxOrderMapper wxOrderMapper;

    /**
     * 查询领养订单
     * 
     * @param orderId 领养订单ID
     * @return 领养订单
     */
    @Override
    public WxOrder selectWxOrderById(Long orderId)
    {
        return wxOrderMapper.selectWxOrderById(orderId);
    }

    /**
     * 查询领养订单列表
     * 
     * @param wxOrder 领养订单
     * @return 领养订单
     */
    @Override
    public List<WxOrder> selectWxOrderList(WxOrder wxOrder)
    {
        return wxOrderMapper.selectWxOrderList(wxOrder);
    }

    /**
     * 新增领养订单
     * 
     * @param wxOrder 领养订单
     * @return 结果
     */
    @Override
    public int insertWxOrder(WxOrder wxOrder)
    {
        return wxOrderMapper.insertWxOrder(wxOrder);
    }

    /**
     * 修改领养订单
     * 
     * @param wxOrder 领养订单
     * @return 结果
     */
    @Override
    public int updateWxOrder(WxOrder wxOrder)
    {
        return wxOrderMapper.updateWxOrder(wxOrder);
    }

    /**
     * 删除领养订单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWxOrderByIds(String ids)
    {
        return wxOrderMapper.deleteWxOrderByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除领养订单信息
     * 
     * @param orderId 领养订单ID
     * @return 结果
     */
    @Override
    public int deleteWxOrderById(Long orderId)
    {
        return wxOrderMapper.deleteWxOrderById(orderId);
    }
}
